import logging
from flask_migrate import MigrateCommand, Migrate
from flask_script import Manager
from info import db, creat_app
from config import DevelopmentConfig, ProductionConfig


app = creat_app(DevelopmentConfig)
# 创建manager对象
manager = Manager(app)

# 创建迁移对象
Migrate(db, app)

# 给manager绑定迁移对象
manager.add_command('db', MigrateCommand)





if __name__ == '__main__':
    manager.run()